﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE-7">
    <title>中山大学班级管理系统</title>
    <link href="../css/layout.css" rel="stylesheet" type="text/css">
    <link href="../css/screen.css" rel="stylesheet" type="text/css">
    <style>
        #up {
            background-color: aqua;
            width: 50px;
            height: 30px;
        }
    </style>
</head>

<body>
    <div id="header">
        <div class="logo">
            <img src="../images/logo.jpg" alt="中山大学班级管理系统">
        </div>
        <div class="title">
            <img src="../images/title.png" alt="回到主页" border="0">
        </div>
        <div class="themepic">
            <img src="../images/classroom.jpg" border="0">
        </div>
    </div>
    <!-- header end -->
    <div id="menu">
        <ul id="nav">
            <li id="tag1" class="tag">
                <a href="index.html" class>主页</a>
            </li>
            <li id="tag2" class="tag">
                <a href="kc/index.html" title="课程" class>课程</a>
                <ul id="subTag2" style="">
                    <li><a href="">课程信息</a></li>
                    <li><a href="">教学课件</a></li>
                    <li><a href="">课后作业</a></li>
                </ul>
            </li>
            <li id="tag3" class="tag">
                <a href="txl/index.html" class>通讯录</a>
            </li>
            <li id="tag4" class="tag">
                <a href="wjgx/index.html" class>文件共享</a>
            </li>
            <li id="tag5" class="tag">
                <a href="hd/index.html" class>活动</a>
                <ul id="subTag5" style="">
                    <li><a href="">投票决定</a></li>
                    <li><a href="">话题讨论</a></li>
                    <li><a href="">重大通知</a></li>
                </ul>
            </li>
            <li id="tag4" class="tag">
                <a href="bjxc/index.html" class>班级相册</a>
            </li>
            <li id="tag5" class="tag">
                <a href="bjrzh/index.html" class>班级日志</a>
            </li>
        </ul>
    </div>
    <!-- menu end -->
    <input type="text" id="logo" value="" placeholder="头像"></input>
    <div id="up">选择图片</div>
    <br>
    <div id="sapplysctn"></div>
    <div id="sleavesctn"></div>
    <div id="sworksctn"></div>
    <div id="coursectn"></div>
    <div id="cImgsctn"></div>
    <div id="sInfoctn">

    </div>
    <div id="cInfoctn">

    </div>
    <div id="ClassInfo">
        <div id="gongShiBox">
            <div id="ctn" id="gongShiInfo">

            </div>
        </div>
    </div>
    <div id="ClassInfo">
        <div id="gongShiBox">
            <div id="rulesctn" id="gongShiInfo">

            </div>
        </div>
    </div>
    <!-- main end -->
    <div id="footer">
        <div class="bottomlogo">
            <img src="../images/logo-bottom.jpg">
        </div>
        <div class="bottominfo">
            版权所有：中山大学The Way团队
            </br>
            Copyright © 2014-2015 Sun Yat-sen University The Way Team
        </div>
    </div>
</body>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="../js/template-web.js"></script>
<script id="news" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    <p class='list'>标题：<b>{{value.title}}</b></p>
    {{/each}}
    <!-- {{$data}} -->
</script>
<script id="rules" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    <p class='list'>({{i}})<b>{{value.content}}</b></p>
    {{/each}}
    <!-- {{$data}} -->
</script>
<script id="infos" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    <p class='list'>({{i}})<b>{{value.sno}}</b></p>
    <br> {{value.sname}}
    <br>
    <img src=" {{value.simg}}" /> {{value.simg}}
    <br> {{value.info}}
    <br> {{/each}}
    <!-- {{$data}} -->
</script>
<script id="cinfo" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    <img src=" {{value.clogo}}" />
    <br> {{/each}}
    <!-- {{$data}} -->
</script>
<script id="cimg" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    <img src=" {{value.imgs}}" />
    <br> {{/each}}
    <!-- {{$data}} -->
</script>
<script id="course" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    {{value.cname}} {{value.teacher}}
    <br> {{/each}}
    <!-- {{$data}} -->
</script>
<script id="sapplys" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    {{value.sname}} {{value.type}}
    <br> {{/each}}
    <!-- {{$data}} -->
</script>
<script id="sleaves" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    {{value.sname}} {{value.content}}
    <br> {{/each}}
    <!-- {{$data}} -->
</script>
<script id="sworks" type="text/html">
    {{each data value i}}
    <!-- <li>索引 {{i + 1}} ：{{value}}</li> -->
    {{value.sname}} {{value.content}}
    <br> {{/each}}
    <!-- {{$data}} -->
</script>
<script>
    function init() {
        $.post(
            "http://127.0.0.1/newslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("ctn").innerHTML = template(
                    "news",
                    resp
                );
                document.querySelector("#ctn").innerHTML = html;
            }
        );
        $.post(
            "http://127.0.0.1/ruleslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("rulesctn").innerHTML = template(
                    "rules",
                    resp
                );
                document.querySelector("#rulesctn").innerHTML = html;
            }
        );
        $.post(
            "http://127.0.0.1/infoslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("sInfoctn").innerHTML = template(
                    "infos",
                    resp
                );
                document.querySelector("#sInfoctn").innerHTML = html;
            }
        );
        $.post(
            "http://127.0.0.1/cinfoslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("cInfoctn").innerHTML = template(
                    "cinfo",
                    resp
                );
                document.querySelector("#cInfoctn").innerHTML = html;
            }
        );
        $.post(
            "http://127.0.0.1/cimgslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("cImgsctn").innerHTML = template(
                    "cimg",
                    resp
                );
                document.querySelector("#cImgsctn").innerHTML = html;
            }
        );
        $.post(
            "http://127.0.0.1/courseslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("coursectn").innerHTML = template(
                    "course",
                    resp
                );
                document.querySelector("#coursectn").innerHTML = html;
            }
        );
        $.post(
            "http://127.0.0.1/sapplyslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("sapplysctn").innerHTML = template(
                    "sapplys",
                    resp
                );
                document.querySelector("#sapplysctn").innerHTML = html;
            }
        );
        $.post(
            "http://127.0.0.1/sleaveslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("sleavesctn").innerHTML = template(
                    "sleaves",
                    resp
                );
                document.querySelector("#sleavesctn").innerHTML = html;
            }
        );
        $.post(
            "http://127.0.0.1/sworkslist", {

            },
            function(resp) {
                console.log(resp);
                document.getElementById("sworksctn").innerHTML = template(
                    "sworks",
                    resp
                );
                document.querySelector("#sworksctn").innerHTML = html;
            }
        );

    }
    init();
</script>

</html>